#include "XLightNode.h"
#include "../XModEngine/XRender.h"

XLightNode::XLightNode()
{
	m_light = new XLight();
	XRender::GetInstance()->SetLight(m_light->GetLightIndex(), m_light);
}


XLightNode::~XLightNode()
{
	m_light->Release();
}

XLight* XLightNode::GetLight() const{
	return m_light;
}

void XLightNode::TurnOnLight(){
	XRender::GetInstance()->SwitchLight(m_light->GetLightIndex(), true);
}